package com.android.takegism.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.ListView;

import com.android.takegism.R;
import com.android.takegism.utils.Clue;
import com.android.takegism.utils.MyContext;

import java.util.LinkedList;

public class MyCluesActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_clues);
        bindViews();
    }


    ListView listView4Easy;
    ListView listView4Middle;

    private void bindViews() {
//        listView4Easy = findViewById(R.id.my_clues_list_view_4_easy);
        listView4Middle = findViewById(R.id.my_clues_list_view_4_middle);
        /*LinkedList<Clue> easy_clues = (LinkedList<Clue>) MyContext.getInstance().getAllClues("update_clues");
        if (easy_clues == null){
            easy_clues = new LinkedList<>();
        }
        listView4Easy.setAdapter(new ClueAdapter(easy_clues,this));*/
//        TextView textViewTmp = new TextView(MyCluesActivity.this);
//        listView4Middle.addHeaderView(textViewTmp);

        LinkedList<Clue> middle_clues = (LinkedList<Clue>) MyContext.getInstance().getAllClues("update_clues");
        if (middle_clues == null) {
            middle_clues = new LinkedList<>();
        }
        listView4Middle.setAdapter(new ClueAdapter(middle_clues, this));

    }
}